package com.qianxun.plugins.shiro;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * shiro 登录凭证，添加loginType字段，用于区别管理员用户和普通用户
 * @author: huwei
 * @date: 2019/11/15 16:43
 * @version: 1.0.0
 */
@Data
@Accessors(chain = true)
public class LoginTypeToken extends UsernamePasswordToken {
    /**
     * 登录类型
     */
    private LoginType loginType;
    /**
     * ipv4地址
     */
    private String ipv4;
    /**
     * ipv6地址
     */
    private String ipv6;
    /**
     * 短信验证码
     */
    private String smsCode;

    public LoginTypeToken(String username , String password , LoginType loginType){
        super(username, password);
        this.loginType = loginType;
    }


}
